package com.wchinasofit.fz;

        import java.awt.*;

public class Student {
    String name;
    private  int age;
    //set  get

    public  void setAge(int age){
        if(age<0||age>120){
            System.out.println("你输入的年龄有误");
        }
        else {
            this.age=age;
        }

    }
    public int getAge(){
        return age;
    }

    public void show(){
        System.out.println(name+"..."+age);
    }

}
